<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<script type="text/javascript" src="js/jquery.min.js" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/js/jquery.min.js" ></script>
		<script type="text/javascript" src="js/amazeui.min.js" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/js/amazeui.min.js"></script>
		<link rel="stylesheet" href="css/amazeui.min.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/amazeui.min.css" type="text/css" />
		<link rel="stylesheet" href="css/style.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/style.css" type="text/css" />
	</head>
	<body>
		  <header data-am-widget="header" class="am-header am-header-default jz">
		      <div class="am-header-left am-header-nav">
		         <a href="javascript:history.back()" class="">
					<i class="am-icon-chevron-left"></i>
				</a>
		      </div>
		      <h1 class="am-header-title">
		          <a href="#title-link" class="">商会列表</a>
		      </h1>
		      <div class="am-header-right am-header-nav">
		         <a class="" onclick="finds();">
					搜索
				</a>
		      </div>
            </header>
            <ul class="nav">
            	<!--<li>
            		<a href="">
            			<img src="images/1.png" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/images/1.png" />
            			<span>冰箱清洗</span>
            			<i class="am-icon-angle-right"></i>
            		</a>
            	</li>-->
            </ul>
            <div style="height: 49px;"></div>
            <div data-am-widget="navbar" class="am-navbar  gm-foot am-no-layout" id="">
				<ul class="am-navbar-nav am-cf am-avg-sm-4">
					<li>
						<a href="index.html" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/index.html" class="curr">
							<span class="am-icon-home"></span>
							<span class="am-navbar-label">首页</span>
						</a>
					</li>
					<li>
						<a href="price.html" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/order.html" class="">
							<span class="am-icon-paypal"></span>
							<span class="am-navbar-label">报价</span>
						</a>
					</li>
					<li>
						<a href="yezhuquan.html" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/order.html" class="">
							<span class="am-icon-spinner"></span>
							<span class="am-navbar-label">业主圈</span>
						</a>
					</li>
					<li class="curr">
						<a href="main.html" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/member.html" class="">
							<span class="am-icon-user"></span>
							<span class="am-navbar-label">我的</span>
						</a>
					</li>
				</ul>
			</div>
	</body>
	<script type="text/javascript" src="js/hui.js"></script>
	<script>
		var html = '<li>';
		html = html + '<a>';
		html = html + '<img src="~" onclick="lookInfo(~);"/>';
		html = html + '<span onclick="lookInfo(~);">~</span>';
		html = html + '<span style="float:right;"><i class="am-icon-angle-right"></i></span><span style="float:right;color:#009cff" onclick="lookPrice(~);">Ta的报价</span>';
		html = html + '</a>';
		html = html + '</li>';
		list("");
		function list(val){
			hui.postJSON(
			    rootpath+'/businessMan/getBusinessManList',
			    {
			    	"findName":val
			    },
			    function(msg){
			    	console.log(msg);
				  	var all = '';
				  	for(var i=0;i<msg.length;i++){
                      	if(!msg[i].faceImg){
                           msg[i].faceImg = "/upload/face.gif";
                        }
						if(msg[i].faceImg.indexOf("http")>-1){
                           	all = all + html.replace("~",msg[i].faceImg).replace("~",msg[i].id).replace("~",msg[i].id).replace("~",msg[i].hotelSinName).replace("~",msg[i].id);
                        }else{
                        	all = all + html.replace("~",rootpath+msg[i].faceImg).replace("~",msg[i].id).replace("~",msg[i].id).replace("~",msg[i].hotelSinName).replace("~",msg[i].id);   
                        }
				  	}
				  	$(".nav").html(all);
			    },
			    function(e){
			        hui.iconToast('读取消息失败', 'warn');
			        console.log(e);
			    }
			);
		}
		function finds(){
			 hui.prompt('请输入关键字？', ['取消','确定'], function(name){
		        list(name);
		    }, '关键字', '',function(){console.log('您点击了取消')});
		}
		function lookInfo(val){
		    localStorage.removeItem("busid");
		    localStorage.setItem("busid",val);
		    location.href="businessMan.html";
		}
		function lookPrice(val){
			localStorage.removeItem("itemTypeId");
		    localStorage.setItem("itemTypeId",val);
		    location.href="priceInfo.html";
			
		}
	</script>
</html>
